home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 011 / autodesk.arc / RELATIVE.LSP < prev    next >
Encoding:
Text File  |  1986-07-25  |  1.4 KB  |  37 lines

  1.  
  2. ;                           RELATIVE.LSP
  3.  
  4. ;        By Simon Jones  Autodesk Ltd, London     23 July 1986
  5.  
  6. ;         This macro provides a point that is relative by a
  7. ;        given angle and distance to a known point such as
  8. ;        the "End pt" of a line or "Centre of" a circle.
  9.  
  10. ;         When AutoCAD requires a point for a command
  11. ;        respond with:
  12. ;                      !(relative)   (from keyboard)
  13.  
  14. ;         Or alternatively enter the following line as a menu
  15. ;        command in the "**OSNAPB 3" sub-menu in the screen menu
  16. ;        with the remaining object snap commands:
  17.  
  18. ;                   [RELATIVE]!(offset) $s=
  19.  
  20. ;         The macro can be copied onto an ACAD.LSP file to ensure
  21. ;        it is allows loaded into a drawing
  22.  
  23. ;                then:
  24. ;                    1) Enter or select a point.
  25. ;                         (using object snap if required)
  26. ;                    2) Enter or show a distance relative to
  27. ;                         the selected point.
  28. ;                    3) Enter or show an angle relative to
  29. ;                         the selected point
  30.  
  31.            (defun RELATIVE ()
  32.              (setq pts (getpoint "\nRelative to: "))
  33.              (setq dist (getdist pts "\nRelative distance: "))
  34.              (setq ang (getangle pts "\nRelative angle: "))
  35.              (setq pt (polar pts ang dist))
  36.            )
  37.